<style type="text/css">
	.delete_input_head {
		cursor: pointer;
	}
	.order_product_slide {
		border: 1px solid #ddd;
		width: 40px;
		height: 15px;
		line-height: 15px;
		text-align: center;	
	}
	.save_img {
		width: 13px;
		height: 13px;
		border: none;
	}
	.img_std_admin {
	    display: table;
	    height: 352px;
	    padding: 5px 0;
	    width: 308px;
	}
	.img_std_admin div {
	    display: table-cell;
	    vertical-align: middle;
		text-align: center; 
	}
	.sp_indexsub_img {
	    border: medium none;
	    height: auto !important;
	    max-height: 300px;
	    max-width: 300px;
	    min-height: 150px;
	    min-width: 200px;
	    width: auto !important;
	}
	.content_ct_show_head {
		border: none;
		border-bottom: 1px solid #CCCCCC;
	}
</style>

<!-- js validate form  -->
<script type="text/javascript">
function submitform()
{
  document.myform.submit();
}
</script>

<div class="content_head">
	<?php echo $title; ?>
</div>
	
<div class="content_ct">
	<div class="content_ct_show">		
		<div class="content_ct_show_head">
			<input class="delete_input_head" type="button" value="Xóa" />
			<a class="add_new" href="<?php echo base_url()?>back_end/product_slide/add">Thêm mới</a>
			<span style="padding-left: 5px; color: #FF9933;" class="count_check"></span>
		</div>
		
			<div class="content_ct_show_ct">
				<table class="content_ct_show_ct_tbl" width="100%">   
					<tr class="content_ct_show_ct_tbl_top">
						<td width="5%">
							<input type="checkbox" class="input_checkall" />
						</td>
						<td width="5%">
	                    	<a class="link_change" href="<?php echo base_url() ?>back_end/product_slide/sort/id/<?php echo $sort; ?>">ID</a>
						</td>
						<td width="25%">
							<a class="link_change" href="<?php echo base_url() ?>back_end/product_slide/sort/title/<?php echo $sort; ?>">Tiêu đề</a>
						</td>
						<td width="25%">
							<a class="link_change" href="<?php echo base_url() ?>back_end/product_slide/sort/link/<?php echo $sort; ?>">Đường dẫn</a>
						</td>
						<td width="30%">
							<a class="link_change">Ảnh</a>
						</td>
						<td width="5%">
							<a class="link_change" href="<?php echo base_url() ?>back_end/product_slide/sort/status/<?php echo $sort; ?>">Trạng thái</a>
						</td>
						<td width="5%">
							<span>Action</span>
						</td>
					</tr>
					
					<?php
	                	$count = 1; 
	                	if (count($product_slide_value) > 0) {
	                		foreach ($product_slide_value as $value) {
	                		$count += 1;	 
	                ?> 
					<tr class="<?php if ($count%2) { echo 'content_ct_show_ct_tbl_bt_1'; } else { echo 'content_ct_show_ct_tbl_bt_2'; }  ?>">
						<td>
							<input class="input_checkbox" type="checkbox"  value="<?php echo $value['id']; ?>" name="value_id[]"/>
						</td>
						<td>
							<span><?php echo $value['id']; ?></span>
						</td>
						<td>
							<span><?php echo $value['title']; ?></span>
						</td>
						<td>
							<span><?php echo $value['link']; ?></span>
						</td>
						<td>
							<?php
								if ($value['image'] == '') {
							?>
							<div class="img_std_admin">
								<div>
									<img src="<?php echo base_url();?>images/img_product/noimg.jpg"  class="sp_indexsub_img">
								</div>	
							</div>	
							<?php 		
								} else { 
							?>
							<div class="img_std_admin">
								<div>
									<img src="<?php echo base_url();?>images/img_product/<?php echo $value['image']; ?>"  class="sp_indexsub_img">
								</div>	
							</div>
							<?php
								} 
							?>
						</td>
						<td>
							<?php if($value['status'] == 1) { ?>
	                    		<a class="tag_action" href="<?php echo base_url()?>back_end/admins/active/<?php echo $table.'-'.$value['id'].'-'.'0'.'-'.$table; ?>"><img src="<?php echo base_url()?>images/back_end/icon/check2.png" title="Trạng thái" alt="icon check" /></a>
	                    	<?php } else { ?>
	                 			<a class="tag_action" href="<?php echo base_url()?>back_end/admins/active/<?php echo $table.'-'.$value['id'].'-'.'1'.'-'.$table; ?>"><img src="<?php echo base_url()?>images/back_end/icon/check.png" title="Trạng thái" alt="icon check" /></a>
	                    	<?php }?>
						</td>
						<td>
							<a href="<?php echo base_url()?>back_end/product_slide/edit/<?php  echo $value['id']; ?>">Sửa</a>
							<span>|</span>
							<a href="<?php echo base_url()?>back_end/product_slide/delete/<?php  echo $value['id']; ?>">Xóa</a>
						</td>
					</tr>
					<?php }
					 	} else {
					?>
					<tr>
						<td colspan="7"><i style="color: #000;">Không có kết quả nào được tìm thấy</i></td>
					</tr> 
					 <?php
					 	} 
					 ?>
				</table>
			</div>
			
			<div class="content_ct_show_paging">
				<span style="color: #888;">Tổng số:</span>
				<span style="color: #444;">(<?php echo $this->pagination->total_rows; ?>)</span>
				<?php echo $this->pagination->create_links(); ?>
			</div>			
		</div>
	<!-- end content_ct_show -->
	
</div>

